<template>
  <div>
    <div class="title">周末去哪儿</div>
    <ul>
      <li class="item border-bottom"
      v-for="item of weekendList"
      :key="item.id"
      >
        <div class="item-img-wrapper">
          <img :src="item.imgUrl" alt="" class="item-img">
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HomeWeekend',
  props: {
    weekendList: Array
  },
  data () {
    return {/*  WeekendList: [{
        id: '001',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }, {
        id: '002',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }, {
        id: '003',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }, {
        id: '004',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }, {
        id: '005',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }, {
        id: '006',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }, {
        id: '007',
        imgUrl: 'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
        title: '标题',
        desc: '详情'
      }] */
    }
  }
}
</script>

<style scoped>
  .title {
    font-size: .24rem;
    margin-top: .2rem;
    line-height: .7rem;
    background: #ccc;
    text-indent: .2rem
  }
  .item {
    font-size: .24rem;
    padding-bottom: .2rem
  }
  .item-img-wrapper {
    overflow: hidden;
    height: 0;
    padding-bottom: 33.9%
  }
  .item-img {
   width:100%
  }
  .item-info {
    flex: 1;
    padding: .1rem;
  }
  .item-title {
    line-height: .54rem;
    font-size: .32rem
  }
  .item-desc {
    line-height: .4rem;
    color: #ccc;
  }
</style>
